package com.hframe.typefilter;

/**
 * 字符口串转数字
 *
 * @author Administrator
 */
public class StringToShort implements FilterRef<Short, Object> {

    @Override
    public Short filter(Object object) throws Exception {
        return Short.parseShort((String) object);
    }

    public static Short parse(String object) {
        try {
            return Short.parseShort(object);
        } catch (Exception e) {
            return null;
        }
    }
}